Finding inverse of 3x3 matrices